﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GauntletFramework.SpriteManagment
{
    public class BasicSprite : Sprite
    {
        public BasicSprite()
        {
        }

        public Vector2 position, velocity, acceleration;
        public Color Color;

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            velocity += acceleration * (float)gameTime.ElapsedGameTime.TotalSeconds;
            position += velocity * (float)gameTime.ElapsedGameTime.TotalSeconds;
        }

        public override void Draw(GameTime gameTime)
        {
            if (Current != null)
                Current.Draw(StaticGame.SpriteBatch, position, Color, 0f, Current.SpriteSheet.HalfFrame, 1f, SpriteEffects.None, 0f);
        }
    }
}
